﻿<Window x:Class="DeployForwardMailboxRules.MainWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        Title="MainWindow" Height="700" Width="800">
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="100"></RowDefinition>
            <RowDefinition Height="500"></RowDefinition>
        </Grid.RowDefinitions>
        <StackPanel HorizontalAlignment="Left" Name="settingsPanel" VerticalAlignment="Center" Grid.Row="0" Margin="5">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="100"></ColumnDefinition>
                    <ColumnDefinition Width="200"></ColumnDefinition>
                    <ColumnDefinition Width="20"></ColumnDefinition>
                    <ColumnDefinition Width="100"></ColumnDefinition>
                    <ColumnDefinition Width="200"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                </Grid.RowDefinitions>
                <Label Content="UserName:" Grid.Column="0" Grid.Row="0" Margin="2"></Label>
                <TextBox Name="userName" Grid.Column="1" Grid.Row="0" Margin="2"></TextBox>
                <Label Content="Password:" Grid.Column="3" Grid.Row="0" Margin="2"></Label>
                <PasswordBox Name="password" Grid.Column="4" Grid.Row="0" Margin="2"></PasswordBox>
                <Label Content="Use AutoDiscover: " Grid.Column="0" Grid.Row="1" Margin="2"></Label>
                <CheckBox Name="useAutoDiscover" Grid.Column="1" VerticalAlignment="Center" Grid.Row="1" Margin="2" Checked="useAutoDiscover_Checked" Unchecked="useAutoDiscover_Checked"></CheckBox>
                <Label Content="EWS Endpoint: " Grid.Column="3" Grid.Row="1" Margin="2"></Label>
                <TextBox Name="ewsEndpoint" Grid.Column="4" Grid.Row="1" Margin="2"></TextBox>
                <Label Content="Forward Mailbox:" Grid.Column="0" Grid.Row="2" Margin="2"></Label>
                <TextBox Name="forwardEmailAddress" Grid.Column="1" Grid.Row="2" Margin="2"></TextBox>
            </Grid>
        </StackPanel>
        <StackPanel HorizontalAlignment="Left" Name="userAddressesPanel" VerticalAlignment="Center" Grid.Row="1" Margin="5">
            <Grid>
                <Grid.ColumnDefinitions>
                    <ColumnDefinition Width="500"></ColumnDefinition>
                    <ColumnDefinition Width="300"></ColumnDefinition>
                </Grid.ColumnDefinitions>
                <Grid.RowDefinitions>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="300"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="30"></RowDefinition>
                    <RowDefinition Height="*"></RowDefinition>
                </Grid.RowDefinitions>
                <Label Content="User Mailbox Email Addresses:" Grid.Row="0" Grid.Column="0" Margin="2"></Label>
                <TextBox Name="emailAddressBox" Grid.Row="1" Grid.Column="0" Margin="2" KeyDown="emailAddressBox_KeyDown"></TextBox>
                <Button Name="addEmail" Content="Add" Grid.Row="1" Grid.Column="1" Margin="50,2,150,2" Click="addEmail_Click"></Button>
                <ListBox Name="emailsGrid" Grid.Row="2" Grid.Column="0" Margin="2"></ListBox>
                <Button Name="removeEmail" Content="Remove" Grid.Row="3" Grid.Column="0" HorizontalAlignment="Right" Click="removeEmail_Click" Margin="2"></Button>
                <Label Content="Create New Forward Mailbox rule, if not exists already: " Grid.Row="4" Grid.Column="0" Margin="2"></Label>
                <Button Content="Create" Name="createRules" Grid.Row="4" Grid.Column="1" Margin="50,2,150,2" Click="createRules_Click"></Button>
                <Label Content="Delete Forward Mailbox rule, if exists already: " Grid.Row="5" Grid.Column="0" Margin="2"></Label>
                <Button Content="Delete" Name="deleteRules" Grid.Row="5" Grid.Column="1" Margin="50,2,150,2" Click="deleteRules_Click"></Button>
                <!--<Label Content="Clear Data Grid records which already have Forward rule present: " Grid.Row="6" Grid.Column="0" Margin="2"></Label>
                <Button Content="Clear" Name="clearGrid" Grid.Row="6" Grid.Column="1" Margin="50,2,150,2" Click="clearGrid_Click"></Button>-->
            </Grid>
        </StackPanel>
    </Grid>
</Window>
